
import {
    CanDeactivate,
} from '@angular/router';
import { LoginComponent } from '../pages/login/login.component';


// 离开路由时候的守卫
export class DepartureGuard implements CanDeactivate<LoginComponent> {
    canDeactivate(component: LoginComponent) {
        return window.confirm('你还没有保存确定要离开吗')
    }
}